package org.example;

import java.io.Serializable;

/*
    标准Java类 --- JavaBean --- Bean类
    你们后面学到的很多框架都只能基于标准Java类进行开发。
    JavaBean的规范：
    1、必须提供公共无参构造 --- 养成一旦书写了带参构造，一定要手工书写公共无参构造
    2、必须要为私有属性提供符合命名规范的get/set方法。

    你们要养成习惯于在外部操作对象的时候，通过get/set方法去操作对象的属性。
 */
public class User implements Serializable {
    //    用户名
    private String username;
    //    密码
    private String password;
    //    账户金额
    private Double account;

    public User() {
    }

    public User(String username, String password, Double account) {
        this.username = username;
        this.password = password;
        this.account = account;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Double getAccount() {
        return account;
    }

    public void setAccount(double account) {
        this.account = account;
    }

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", account=" + account +
                '}';
    }
}
